package com.kexio.enterprise.observability.tracing.domain;

import com.kexio.enterprise.observability.tracing.enums.SpanStatus;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 追踪信息
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class TraceInfo {
    private String traceId;
    private List<SpanInfo> spans;
    private LocalDateTime startTime;
    private LocalDateTime endTime;
    private long duration;
    private String rootOperationName;
    private SpanStatus status;
    private Map<String, String> tags;

    // Getters and Setters
    public String getTraceId() { return traceId; }
    public void setTraceId(String traceId) { this.traceId = traceId; }
    
    public List<SpanInfo> getSpans() { return spans; }
    public void setSpans(List<SpanInfo> spans) { this.spans = spans; }
    
    public LocalDateTime getStartTime() { return startTime; }
    public void setStartTime(LocalDateTime startTime) { this.startTime = startTime; }
    
    public LocalDateTime getEndTime() { return endTime; }
    public void setEndTime(LocalDateTime endTime) { this.endTime = endTime; }
    
    public long getDuration() { return duration; }
    public void setDuration(long duration) { this.duration = duration; }
    
    public String getRootOperationName() { return rootOperationName; }
    public void setRootOperationName(String rootOperationName) { this.rootOperationName = rootOperationName; }
    
    public SpanStatus getStatus() { return status; }
    public void setStatus(SpanStatus status) { this.status = status; }
    
    public Map<String, String> getTags() { return tags; }
    public void setTags(Map<String, String> tags) { this.tags = tags; }
}
